define(["jquery","vue",'common'],function ($,Vue,common){
    const Controller = {
        index:function (){
            var app = Vue.createApp({
                data(){
                    return {
                        height:0,
                        seachObj:[
                            {
                                title:"用户名",
                                field:"username",
                                type:"like",
                                seachType:"input",
                                value:"",
                                show:true,
                            },
                            {
                                title:"标题",
                                type:"like",
                                field:"title",
                                seachType:"input",
                                value:"",
                                show:true,
                            },
                            {
                                title:"链接",
                                type:"like",
                                field:"url",
                                seachType:"input",
                                value:"",
                                show:true,
                            },
                            {
                                title:"IP",
                                type:"like",
                                field:"ip",
                                seachType:"input",
                                value:"",
                                show:true,
                            },
                            {
                                title:"创建时间",
                                type:"between",
                                field:"createtime",
                                seachType:"datetimerange",
                                sub_type:"strtotime",
                                value:null,
                                show:true,
                            }
                        ],
                        dataObj:{
                            total:0,
                            rows:[],
                            limit:10,
                            page:1
                        },
                        //打开搜索
                        openSeach:false,
                        //显示搜索
                        seachShow:false
                    }
                },
                created(){
                    //加载数据
                    this.indexLoadData()
                    //加载搜索框
                    this.loadSeach()
                    // this.indexCreateHeight(230)
                    // let that = this
                },
                methods:{
                    ...common,
                }
            })
            common.loadELEMENT(app,false)
            
            app.mount("#app");
        }
    }
    return Controller;
})